<template>
  <div class="MyFooter px-10 py-10">
    <v-menu top offset-y :close-on-click="closeOnClick">
      <template v-slot:activator="{ on, attrs }">
        <v-btn
          color="primary"
          dark
          v-bind="attrs"
          v-on="on"
        >
          Settings
        </v-btn>
      </template>

      <v-list>
        <v-list-item
          v-for="(item, index) in items"
          :key="index"
          @click="onClick(item)"
        >
          <v-list-item-title>{{ item.title }}</v-list-item-title>
        </v-list-item>
      </v-list>
    </v-menu>
    <span class="time font-weight-bold ">{{ time }}</span>
  </div>
</template>

<script>
export default {
  name: 'MyFooter',
  data () {
    return {
      items: [
        { title: '1' },
        { title: '2' },
        { title: '3' }
      ],
      time: new Date().toLocaleString('en-US')
    }
  },
  created () {
  },
  methods: {
    onClick (item) {
      console.log(item)
    },
    closeOnClick (e) {
      console.log(e)
    }
  }
}
</script>

<style lang="less" scoped>
.MyFooter {
  width: 100vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #3a61a4;
  .time {
    color: #fff;
    font-size: 1.2rem;
  }
}
</style>
